<%--
  Created by GHW.
  Date: 2019/12/18
  Time: 11:21
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>游戏详情</title>
    <c:set value="${pageContext.request.contextPath}" var="ctx"/>
    <link rel="stylesheet" href="${ctx}/css/bootstrap.css" type="text/css">
    <link rel="stylesheet" href="${ctx}/css/game2.css" type="text/css">
</head>
<body>
<ol class="breadcrumb">
    <li class="active"><a href="findAllGameByPage">返回</a></li>
</ol>

<form action="${ctx}/updateGame" method="post" enctype="multipart/form-data">
    <div class="wrapper">
        <div class="form-header">修改游戏信息</div>
        <div class="form-grp">
            <label>游戏预览图</label>
            <img src="${ctx}/img/gameImg/${game.img}"alt="${game.img}" style="height: 200px;width: 460px;"/>
        </div>
        <div class="form-grp">
            <input type="hidden" name="id" value="${game.id}">
            <label for="name">游戏名字：</label>
            <input type="text" name="name" id="name" required value="${game.name}">
        </div>
        <div class="form-grp">
            <label for="developer">开发商：</label>
            <input type="text" name="developer" id="developer" required value="${game.developer}">
        </div>
        <div class="form-grp">
            <label for="price">游戏原价：</label>
            <input type="text" name="price" id="price" required value="${game.price}">
        </div>
        <div class="form-grp">
            <label for="discountprice">折后价：</label>
            <input type="text" name="discountprice" id="discountprice" required value="${game.discountprice}">
        </div>
        <div class="form-grp">
            <label for="img">游戏图片：</label>
            <input type="hidden" name="oldImg" value="${game.img}">
            <input type="file" name="upload" id="img" alt="${game.img}" value="${game.img}">
        </div>
        <div class="form-grp">
            <label for="platform">运行平台：</label>
            <input type="text" name="platform" id="platform" required value="${game.platform}">
        </div>
        <div class="form-grp">
            <label for="tag">游戏标签：</label>
            <select id="tag" name="tag">
                <option value="${game.tag}" selected>${game.tag}</option>
                <option value="射击">射击</option>
                <option value="动作">动作</option>
                <option value="冒险">冒险</option>
                <option value="赛车">赛车</option>
                <option value="角色扮演">角色扮演</option>
                <option value="独立">独立</option>
                <option value="休闲">休闲</option>
                <option value="科幻">科幻</option>
            </select>
        </div>
        <div class="form-grp">
            <label for="description">描述：</label>
            <input type="text" name="description" id="description" required value="${game.description}">
        </div>
        <div class="form-grp">
            <input type="submit" value="更新" class="button buttonBlue"></div>
    </div>
</form>
<script src="${ctx}/js/jquery-3.4.1.min.js"></script>
<script src="${ctx}/js/bootstrap.js"></script>
<script src="${ctx}/js/game.js"></script>
</body>
</html>
